<%@ Page Language="vb" AutoEventWireup="false" CodeFile="anagrafica.aspx.vb" Inherits="anagrafica1" %>
<%@ Register TagPrefix="uc1" TagName="ucComboComuni" Src="controlli/ucComboComuni.ascx" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
	<HEAD>
		<title>Anagrafica</title>
		<meta content="Microsoft Visual Studio .NET 7.1" name="GENERATOR">
		<meta content="Visual Basic .NET 7.1" name="CODE_LANGUAGE">
		<meta content="JavaScript" name="vs_defaultClientScript">
		<meta content="http://schemas.microsoft.com/intellisense/ie5" name="vs_targetSchema">
		<LINK href="style.css" type="text/css" rel="StyleSheet">
	</HEAD>
	<body onload=" handleKeyUp(20); " MS_POSITIONING="GridLayout">
		<form id="Form1" method="post" runat="server">
			<input id="chiudiAna" type="hidden" value="0" runat="server" NAME="chiudiAna"> <input id="msg" type="hidden" name="msg" runat="server">
			<div align="center">
				<!-- tabella di contorno, bordo rosso -->
				<table width="700" celppadding="0" cellspacing="0" border="1" style="BORDER-RIGHT:1px; BORDER-TOP:1px; BORDER-LEFT:1px; BORDER-BOTTOM:1px"
					bordercolor="#de0029" id="tabella di contorno">
					<TBODY>
						<tr>
							<td width="100%" bgcolor="#de0029">
								<table cellSpacing="0" cellPadding="0" width="700" border="0" ID="Table1" bgcolor="#ffffff"
									style="BORDER-COLLAPSE: collapse" bordercolor="#111111">
									<tr>
										<td width="6">
											<img src="images/x.gif" width="1" height="1"></td>
										<td width="15">
											<img src="images/quadratino_rosso.gif" width="10" height="10"></td>
										<td width="328" height="10"><span class="titolo">Dati anagrafici</span>
										</td>
										<td width="327" valign="middle">
											<span class="blu">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
												<INPUT class="blu" id="btChiudi" style="BACKGROUND-POSITION: right center; BACKGROUND-IMAGE: url(images/chiudi.gif); VERTICAL-ALIGN: sub; WIDTH: 67px; CURSOR: hand; BORDER-TOP-STYLE: none; BACKGROUND-REPEAT: no-repeat; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none; HEIGHT: 19px; BACKGROUND-COLOR: transparent; TEXT-ALIGN: left; BORDER-BOTTOM-STYLE: none"
													onclick="chiudi();" type="button" value="chiudi" name="btChiudi"></span>
										</td>
									</tr>
									<tr>
										<td colspan="4" width="100%" height="5"><img src="images/x.gif" width="1" height="5"></td>
									</tr>
								</table>
								<table cellSpacing="0" cellPadding="0" width="700" border="0" ID="Table1" bgcolor="#ffffff"
									style="BORDER-COLLAPSE: collapse" bordercolor="#111111">
									<tr>
										<td width="100%" height="15"><img src="images/x.gif" width="1" height="5"></td>
									</tr>
								</table>
								<TABLE width="700" cellspacing="0" cellpadding="0" bgcolor="#ffffff">
									<TBODY>
										<TR>
											<TD width="6" valign="top"><img src="images/x.gif" alt=""></TD>
											<TD width="688" valign="top" bgcolor="#fff8f9">
												<table borderColor="#1a49a3" cellSpacing="1" cellPadding="4" width="100%" bgColor="#ffffff"
													border="1">
													<tr>
														<td width="100%">
															<table width="100%" cellpadding="4" cellspacing="1" bgcolor="#ffffff" border="0">
																<tr>
																	<td colspan="3" height="30">
																		<asp:Label id="lbNumIsc" runat="server" CssClass="blu">Numero Iscrizione Previsto:</asp:Label>
																	</td>
																</tr>
																<TR>
																	<td style="WIDTH: 152px" valign="top">
																		<span class="nero">Intest.<SPAN class="blu">
																				<asp:textbox id="txIntest" runat="server" Font-Bold="True" CssClass="nero" Width="154px"></asp:textbox></SPAN></span></td>
																	<td style="WIDTH: 228px">
																		<P><span class="nero">Cognome</span><br>
																			<asp:textbox id="txCognome" runat="server" Font-Bold="True" CssClass="nero" Width="205px"></asp:textbox><asp:requiredfieldvalidator id="RequiredFieldValidator2" runat="server" ErrorMessage="Cognome" ControlToValidate="txCognome">*</asp:requiredfieldvalidator><BR>
																			<SPAN class="nero">
																				<BR>
																			</SPAN>
																			<asp:textbox id="txAcquisito" runat="server" Font-Bold="True" CssClass="nero" Width="205px" Visible="False"></asp:textbox></P>
																	</td>
																	<td style="WIDTH: 218px" valign="top"><span class="nero">Nome</span><br>
																		<asp:textbox id="txNome" runat="server" Font-Bold="True" CssClass="nero" Width="191px"></asp:textbox><asp:requiredfieldvalidator id="RequiredFieldValidator1" runat="server" ErrorMessage="Nome" ControlToValidate="txNome">*</asp:requiredfieldvalidator></td>
																</TR>
																<tr>
																	<td colSpan="3"><SPAN class="blu">Nascita:&nbsp;&nbsp;
																			<asp:checkbox id="chkPrivacy" runat="server" CssClass="nero" Text="privacy"></asp:checkbox><INPUT id="numero" style="WIDTH: 56px; HEIGHT: 22px" type="hidden" size="4" name="numero"
																				runat="server"><INPUT id="desc" style="WIDTH: 56px; HEIGHT: 22px" type="hidden" size="4" name="desc" runat="server"></SPAN></td>
																</tr>
																<tr>
																	<td style="WIDTH: 152px; HEIGHT: 32px" vAlign="top">
																		<P><span class="nero">Data</span><br>
																			</P>
																	</td>
																	<td style="HEIGHT: 32px">
																		<P><span class="nero">Comune<BR>
																			</span><SPAN class="nero">
																				<uc1:ucComboComuni name="ucCbComuni" id="ucCbComuni" runat="server"></uc1:ucComboComuni></SPAN></P>
																	</td>
																	<td style="HEIGHT: 32px" vAlign="top"><P><span class="nero">Provincia</span><br>
																			<asp:dropdownlist id="dProvincia" runat="server" CssClass="nero" DataTextField="descrizione" DataValueField="codice"></asp:dropdownlist></P>
																	</td>
																</tr>
																<tr>
																	<td style="WIDTH: 152px; HEIGHT: 36px">
																		<P><SPAN class="nero">Stato<BR>
																			</SPAN>
																			<asp:dropdownlist id="dStatoNascita" runat="server" CssClass="nero" DataTextField="descrizione" DataValueField="codice"></asp:dropdownlist></P>
																	</td>
																	<td style="HEIGHT: 36px"><SPAN class="nero">Cittadinanza</SPAN><BR>
																		<asp:dropdownlist id="dCitt" runat="server" CssClass="nero" DataValueField="codice" DataTextField="descrizione"></asp:dropdownlist>&nbsp;</td>
																	<td style="HEIGHT: 36px"><SPAN class="nero"><SPAN class="nero">Sesso</SPAN><BR>
																			<asp:dropdownlist id="dSesso" runat="server" CssClass="nero">
																				<asp:ListItem Selected="True"></asp:ListItem>
																				<asp:ListItem Value="M">M</asp:ListItem>
																				<asp:ListItem Value="F">F</asp:ListItem>
																			</asp:dropdownlist>&nbsp; </SPAN>
																	</td>
																</tr>
																<tr>
																	<td style="WIDTH: 152px" valign="top"><span class="nero">Codice Fiscale</span><br>
																		<asp:textbox id="txCodFisc" runat="server" CssClass="nero"></asp:textbox>&nbsp;<asp:linkbutton id="lkCalcola" runat="server" CssClass="blu">calcola</asp:linkbutton>&nbsp;&nbsp;
																		<asp:Label id="lbErrCf" runat="server" CssClass="nero" Visible="False" ForeColor="Red">Mancano dati!</asp:Label>
																	</td>
																	<TD valign="top"><SPAN class="nero">Partita Iva</SPAN><BR>
																		<asp:textbox id="txPiva" runat="server" CssClass="nero"></asp:textbox></TD>
																	<td>
																		<BR>
																	</td>
																</tr>
																<tr>
																	<td align="right" colSpan="3">
																		<asp:linkbutton id="lkSalva" CssClass="blu" Runat="server"><img src="images/salva.gif" border="0">&nbsp;salva</asp:linkbutton>&nbsp;&nbsp;
																		<asp:linkbutton id="lkAnnulla" CssClass="blu" Runat="server"><img src="images/annulla.gif" border="0">&nbsp;annulla</asp:linkbutton>&nbsp;</td>
																</tr>
															</table>
															<P></P>
															<asp:validationsummary id="ValidationSummary1" runat="server" ShowSummary="False" ShowMessageBox="True"
																HeaderText="Dati obbligatori:"></asp:validationsummary>
															<asp:panel id="pnOmonimi" Runat="server" Visible="False">
																<SPAN class="NERO"><B>Sono presenti i seguenti omonimi. Seleziona una delle seguenti 
																		anagrafiche oppure clicca il bottone continua.</B></SPAN>
																<asp:Button id="btContinua" runat="server" CssClass="nero" Text="continua"></asp:Button>
																<BR>
																<BR>
																<asp:DataGrid id="dgOmonimi" runat="server" Width="100%" ItemStyle-CssClass="nero" GridLines="Horizontal"
																	HeaderStyle-CssClass="nero_bold" AutoGenerateColumns="False">
																	<Columns>
																		<asp:BoundColumn DataField="id" Visible="False"></asp:BoundColumn>
																		<asp:BoundColumn DataField="nome" HeaderText="Nome"></asp:BoundColumn>
																		<asp:BoundColumn DataField="Cognome" HeaderText="Cognome"></asp:BoundColumn>
																		<asp:BoundColumn DataField="data_nascita" HeaderText="Data di nascita"></asp:BoundColumn>
																		<asp:TemplateColumn>
																			<ItemTemplate>
																				<asp:ImageButton Runat="server" CausesValidation="False" ID="imgSel" ImageUrl="images/seleziona.gif"
																					CommandName="seleziona"></asp:ImageButton>
																			</ItemTemplate>
																		</asp:TemplateColumn>
																	</Columns>
																</asp:DataGrid>
															</asp:panel></td>
													</tr>
												</table>
											</TD>
										</TR>
										<TR>
											<TD width="6" valign="top" bgcolor="#fff8f9"><img src="../images/x.gif" alt="" height="5"></TD>
											<TD width="688" height="20" valign="top" bgcolor="#fff8f9"></TD>
											<TD width="6" valign="top" bgcolor="#fff8f9"><img src="../images/x.gif" alt="" height="5"></TD>
										</TR>
							</td>
						</tr>
					</TBODY>
				</table>
			</TD></TR></TBODY></TABLE>
		</form>
		<script language="javascript">
			function chiudi(){
				if (document.Form1.chiudiAna.value==1)
				{
					w = eval("window.opener.Form1.opName");
					window.opener.navigate(w.value);
				}
				self.close();  
			}
		
		if (document.Form1.chiudiAna.value==1)
				chiudi();
		</script>
		</DIV>
	</body>
</HTML>
